package indi.xielin.start.domain.dto;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("car")
public class CarDTO {
    /**
     * 车辆id
     */
    @TableId("car_id")
    private Long carId;

    /**
     * 车辆名称
     */
    @TableField("car_name")
    private String carName;

    /**
     * 车辆种类：1-轿车，2-货车
     */
    @TableField("car_type")
    private Integer carType;

    /**
     * 车辆颜色
     */
    @TableField("car_color")
    private String carColor;

    /**
     * 车辆价格
     */
    @TableField("car_price")
    private BigDecimal carPrice;

    /**
     * 制造商
     */
    @TableField("manufacturer")
    private String manufacturer;

    /**
     * 是否删除0是1否
     */
    @TableField(value = "is_delete")
    @TableLogic
    @JsonIgnore//不添加到VO中返回
    private int deleted;

    /**
     * 当前版本
     */
    @TableField(value = "version")
//    @Version
    @JsonIgnore//不添加到VO中返回
    private int version;
}
